<%@ page language="java" contentType="text/html; charset=utf-8"
         pageEncoding="utf-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; utf-8">
    <title>我的数据</title>
    <%@ include file="../../static/top.jsp" %>

</head>
<body class="sticky-header">

<section> <!-- left side start-->
    <%@ include
            file="../../static/menu.jsp" %> <!-- left side end-->

    <!-- main content start-->
    <div class="main-content">

        <!-- header section start-->


        <%@ include file="../../static/header.jsp" %>

        <div class="wrapper">
 			<div class="page-heading">
				<ul class="breadcrumb">
					<li><a href="#">数据处理</a></li>
					<li class="active">我的数据</li>
				</ul>
			</div>
            <div class="row">
                <div class="col-md-12">
                    <div class="panel panel-default">
                        <div class="panel-heading">我的数据</div>
                        <div class="panel-body">
                            <div class="col-md-12">
                                <table class="table table-bordered table-striped table-condensed">
                                    <thead>
                                    <tr>
                                       
                                        <th  width="450px">采集名称</th>
                                        <th  width="300px">采集地址</th>
                                        <th>创建时间</th>
                                        <th>操作</th>

                                    </tr>
                                    </thead>
                                    <tbody id="tbody">


                                    </tbody>
                                </table>
                                  <div class="paging">
									<ul class="pagination" id="Pagination">

									</ul>
								</div>
                            </div>
                        </div>
                    </div>
                </div>

            </div>

        </div>
        <!--body wrapper end-->


        <!--footer section start-->
        <%@ include file="../../static/footer.jsp" %>
        <!--footer section end-->


    </div>
    <!-- main content end--> </section>

<script type="text/javascript">
var pageSize = 10, pageinit = true;	
   
    $(document).ready(function () {
      
    	queryList(1, true);
       

    });

    function queryList(page, pageinit) {
        $("#tbody").empty();

        
        
        $.get("/action/my/m/getMyDagePage",{"pageNum" : page,"pageSize" : pageSize},function(data){
   		 var contain, content;
   			var _totalPage = data.maxPage;
   			if (data.data) {
   				var rows = data.data; 
   				var content = "";
   				for (var i = 0; i < rows.length; i++) {
   					var contain = rows[i];
   					content = content +"<tr><td>" + contain.template_name + "</td><td>" + contain.url + "</td><td>" + contain.create_time+ "</td><td><a href='/action/my/m/show?requestid=" + contain.request_id + "&mid=a2&aid=ch21'>查看数据</a></td></tr>"; 
   				}
   				$("#tbody").append(content);
   			}
   			if (pageinit) {
   			
   				$.jqPaginator('#Pagination',{
   					totalPages : _totalPage,
   					visiblePages : 10,
   					currentPage : 1,
   					prev : '<li class="prev"><a href="javascript:scroll(0,0)">上页</a></li>',
   					next : '<li class="next"><a href="javascript:scroll(0,0)">下页</a></li>',
   					first : '<li class="first"><a href="javascript:scroll(0,0)">首页</a></li>',
   					last : '<li class="last"><a href="javascript:scroll(0,0)">尾页</a></li>',
   					page : '<li class="page"><a href="javascript:scroll(0,0)">{{page}}</a></li>',
   					onPageChange : function(num, type) {
   						if ((this.currentPage != 1)|| (1 != num)) {
   							queryList(num,false);
   						}
   					}
   				});
   			}
   	  })
    }

</script>

</body>
</html>
